//
//  NoDataViewController.m
//  CarStore
//
//  Created by 千锋 on 16/2/17.
//  Copyright (c) 2016年 1000phone. All rights reserved.
//

#import "NoDataViewController.h"

@interface NoDataViewController ()
@property (weak, nonatomic) IBOutlet UIImageView *imgView;
@property (weak, nonatomic) IBOutlet UILabel *label;

@end

@implementation NoDataViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    
    self.tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
    
    [self setUpRefresh];
    [self.tableView.mj_header beginRefreshing];
    
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/** 创建下拉刷新控件*/
- (void)setUpRefresh
{
    __weak typeof(self) weakSelf = self;
    MJRefreshNormalHeader *header = [MJRefreshNormalHeader headerWithRefreshingBlock:^{
        // 请求滚动视图上的数据
        [NSThread sleepForTimeInterval:0.3];
        weakSelf.imgView.hidden = NO;
        weakSelf.label.hidden = NO;
        [weakSelf.tableView.mj_header endRefreshing];
    }];
    self.tableView.mj_header = header;
}


@end
